/*
 * @Author: LBH 1336709799@qq.com
 * @Date: 2025-02-04 10:29:57
 * @LastEditors: LBH 1336709799@qq.com
 * @LastEditTime: 2025-02-06 16:58:06
 * @FilePath: \jike\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Layout from "../pages/Layout";
import Login from "@/pages/Login";
import { AuthRoute } from "@/components/AuthRoute";

import { createBrowserRouter } from "react-router-dom";
import Home from "@/pages/Home";
import Article from "@/pages/Article";
import Publish from "@/pages/Publish";

const router = createBrowserRouter([
  {
    path: "/",
    element: <AuthRoute><Layout /></AuthRoute>,
    children:[
      {
        path:'/',
        element:<Home/>
      },
      {
        path:'article',
        element:<Article/>
      },
      {
        path:'publish',
        element:<Publish/>
      }
    ]
  },
  {
    path: "/login",
    element: <Login />,
  },
]);

export default router;